package cars;

public class Car extends Vehicle{
    private String type;
    //型号

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public Car(String vehicleId, String brand, String type, int perRent) {
        this.type = type;
    }

    //有参构造
    public Car() {
    }
    //无参构造

    @Override
    public float calRent(int date) {
        float sum = date * getPerRent();
        if (date > 150){
            sum *= 0.7;
        } else if (date > 30) {
            sum *= 0.8;
        }else if(date > 7){
            sum *= 0.9;
        }
        return sum;
    }


    //计算租金

    public void leaseOutFlow(){

    }
}
